<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href="{%$URL%}style/webstyle.css" rel="stylesheet" type="text/css" />
<title>{%$web_name%}</title>

</head>
<link href="{%$URL%}mx.ico" rel="shortcut icon"/>
<script src="{%$URL%}jquery-1.7.1.min.js"></script>
<script src="{%$URL%}defalut.js"></script>
<script type="text/javascript">
/*删除购物车中的产品*/
function del_shopping(id){
  if(id){
    $.post("index.php?a=del_shopping",{id:id},function(data){
      if(data){
        if(data=="yes"){
          msg_tips("亲，删除成功！","")
          $("#shopping_list_"+id).remove();//移除删除的产品
          }else{
            msg_tips("亲，删除失败！","")
            }
        }else{
          msg_tips("亲，请求超时，请稍候重试！","")
          }
      })
    }else{
      msg_tips("亲，请求参数有误！","")
      }
  }
</script>
<body>
  <!--头部 开始-->
{%include file='head.htm'%}
<!--头部 结束--> 
<!--内容 开始-->
<div class="nr" style="padding:0 0 40px 0;">
  <div class="main_title"> <span class="main_t">购物车</span><br>
    <!-- Wonderful Case  --></div>
  <div style="padding:40px 0 0 0;">
    <div class="main_l">
      <div class="main_l_title"><span style="font-size:22px;">栏目分类</span><br>
        <!-- Wonderful case --></div>
      <div class="main_l_list">
        <ul>
          <li><a href="index.php?p=user">会员信息</a></li>
          <li><a href="index.php?p=shoppingcart_list">购物车</a></li>
          <li><a href="index.php?p=dingdan_list">订单管理</a></li>
          <li><a href="index.php?p=user_zt">高级会员</a></li>
          <li><a href="index.php?a=user_exit">退出会员</a></li>
        </ul>
      </div>
    </div>
    <div style="float:left; width:800px; margin-left:30px;">
      <ul>
        {%lcmx_shoppingcar_list set="列表名:shoppingcar,显示数目:10,分页显示:1,登录页:index.php?p=user"%}
        {%if $shoppingcar%}
        {%foreach from=$shoppingcar item=list%}
        <li id="shopping_list_{%$list.lc_id%}" style="width:880px; float:left; border-bottom:#ccc 1px dashed;height:100px; line-height:60px;">
          <div>
            <div style="float:left;">
              <img style="width:100px; margin-top:10px; margin-right:10px;" src="{%$list.product_pic%}" border="0" />{%$list.product_name%}
            </div>
            <div style='float:right'>
              <a style="color:#333;" href="index.php?p=products_show&id={%$list.lc_id%}">{%$list.lc_price%}元</a>
              <a style="color:#333;" onClick="del_shopping({%$list.lc_id%})">删除</a>
              <a style="color:#333;" href="index.php?p=products_show&id={%$list.lc_goods_id%}">查看商品</a>
            </div>
          </div>
        </li>
          {%/foreach%}
        <li id="shopping_list_{%$list.lc_id%}" style="width:880px;">
          <div>
            <div align="center">
              <a style="color:#333;" href="index.php?p=dingdan_add">确定购买</a>
            </div>
          </div>
        </li>
      </ul>
      <div class="clear"></div>
      <div id="page">{%$page%}</div>
      {%else%} 亲，您的购物车还是空的！ {%/if%} </div>
    </div>
    <!-- right -->
    <div class="clear"></div>
  </div>
  {%include file="bot.htm"%}</div>
<!-- body --> 
<br>
<br>
</body>
</html>
